﻿@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Components.Forms
@namespace blazorserver.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <base href="~/" />
  <link rel="icon" href="logo.png" type="image/x-icon">
  <link rel="preconnect" href="https://C9UTAZSOWW-dsn.algolia.net" crossorigin />
  <link rel="stylesheet" href="@("https://fastly.jsdelivr.net/npm/@docsearch/css@3")" />
  <link href="_content/AntDesign.Docs/css/default.css" rel="stylesheet">
  <link antblazor-css />
  <component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" />
  <component type="typeof(AntiforgeryToken)" render-mode="Static" />
</head>
<body>
  <app>
    @RenderBody()
  </app>
  @{
#if NET5_0_OR_GREATER
  var polyfillPath = "_framework/blazor.polyfill.min.js";
#else
    var polyfillPath = "https://raw.githubusercontent.com/Daddoon/Blazor.Polyfill@3.0.8/Publish/Blazor.Polyfill.Publish/blazor.polyfill.min.js";
#endif
#if NET6_0
  var isNET6 = true;
#else
    var isNET6 = false;
#endif
    if (isNET6)
    {
      <script src="https://polyfill.io/v3/polyfill.min.js?features=ResizeObserver"></script>
    }
  }
  <script src="@polyfillPath"></script>
  <script src="_content/AntDesign.Charts/g2plot.min.js"></script>
  <script src="_content/AntDesign.Charts/ant-design-charts-blazor.js"></script>
  @* <script src="_content/AntDesign/js/ant-design-blazor.js"></script> *@
  <script src="_content/AntDesign.Docs/js/prism.js"></script>
  <script>
    window.XPrism = {};
    window.XPrism.highlight = function (code, language) {
        return Prism.highlight(code, Prism.languages[language], language);
    }

    window.XPrism.highlightAll = function () {
        Prism.highlightAll();
    }

    window.DocSearchInit = window.DocSearchInit || function(){};
  </script>

  <script>var require = { paths: { 'vs': 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.34.1/min/vs' } }</script>
  <script async src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.34.1/min/vs/loader.min.js"></script>
  <script async src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.34.1/min/vs/editor/editor.main.nls.js"></script>
  <script async src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.34.1/min/vs/editor/editor.main.js"></script>
  <script>
    var instances = {};
    function createEditor(element, id, ref, options) {
      console.log(id);
      var instance = monaco.editor.create(element, options);
      instance.onDidChangeModelContent(function() {
          ref.invokeMethodAsync('OnChangeAsync', instance.getValue());
      });
      instances[id] = instance;
      return instance;
    }
    function copy(id) {
      var text = instances[id].getValue();
      navigator.clipboard.writeText(text);
    }
  </script>

  <script src="@("https://fastly.jsdelivr.net/npm/@docsearch/js@3")"></script>
  <script src="_content/AntDesign.Docs/js/docsearch.js"></script>
  @if (!isNET6)
  {
    <script src="https://polyfill.io/v3/polyfill.min.js?features=ResizeObserver"></script>
  }
  <script antblazor-js></script>
  <script src="_framework/blazor.server.js"></script>

  <link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/@@petercatai/assistant/dist/umd/assistant.min.css" />
  <script src="https://fastly.jsdelivr.net/npm/react/umd/react.development.js"></script>
  <script src="https://fastly.jsdelivr.net/npm/react-dom/umd/react-dom.development.js"></script>
  <script src="https://fastly.jsdelivr.net/npm/dayjs/dayjs.min.js"></script>
  <script src="https://fastly.jsdelivr.net/npm/antd/dist/antd.js"></script>
  <script src="https://fastly.jsdelivr.net/npm/lottie-web/build/player/lottie.js"></script>
  <script src="https://fastly.jsdelivr.net/npm/@@petercatai/assistant/dist/umd/assistant.min.js"></script>
  <script>
    PetercatLUI.initAssistant({
      apiDomain: 'https://api.petercat.ai',
      token: '9dda22fa-1d1a-4854-a53a-5abbc5584840'
    });
  </script>
</body>
</html>
